﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Automapping.Alterations;
using ADIGRE.Domain;
using FluentNHibernate.Mapping;
using FluentNHibernate.Automapping;

namespace ADIGRE.Infrastructure.NHibernateMaps
{
    public class SaidaMap : SubclassMap<Saida>
    {
        SaidaMap()
        {
            Subclass<Pagamento>(m =>
            {
                m.Map(x => x.NuNota);
                m.DiscriminatorValue(EnumLancamento.Pagamento);
            });
            Subclass<Recibo>(m =>
            {
                m.References(x => x.Favorecido);
                m.DiscriminatorValue(EnumLancamento.Recibo);
            });
        }

    }
}
